#ifndef SPAWNABLE_H
#define SPAWNABLE_H

#include "gameObject.h"

#include <queue>

//STUPID LINKING ERROR FIX IS IN: gun.cpp

class Spawnable : public GameObject {
	private:
		static std::queue<GameObject*>* sQueue_;

	public:
		Spawnable() : GameObject() {}
		virtual ~Spawnable() {}
		
		inline bool isSpawnable() {return true;}

		inline static std::queue<GameObject*>* getSpawnQueue() {return sQueue_;}
		inline static void setSpawnQueue(std::queue<GameObject*>* sQueue) {sQueue_ = sQueue;}
		
		//Spawnables are slightly different that most GameObject types.
		//They dont have a function that they call, you just have to add
		//the objects they spawn with this function, then it should work
		//automatically. The game doesn't even need to add them to a
		//special queue.
		inline void spawnObject(GameObject* spawn) {if(sQueue_ != NULL) {sQueue_->push(spawn);}}
};

#endif